home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15082 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.6 KB

  1. Path: news1.interserv.net!news
  2. From: bitsafe@execpc.com
  3. Newsgroups: comp.lang.c++
  4. Subject: Plugins/cgi advice needed
  5. Date: Wed, 03 Apr 1996 17:58:51 GMT
  6. Organization: InterServ News Service
  7. Message-ID: <4ju7b0$dma@lal.interserv.net>
  8. NNTP-Posting-Host: doa99205.doa.state.wi.us
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. I have a web question that maybe some web master can solve. Here's the
  12. senario ...
  13.  
  14. A web server serves up a web page to a browser. The page contains data
  15. on
  16. activities that the user had previously started, but not completed. In
  17. the
  18. meantime the user has created a file *on their machine* that contains
  19. the data
  20. needed to complete the activity.
  21.  
  22. The user presses a button or hypertext link on the web page to select
  23. which
  24. activity they wants to complete. At that point *the browser* needs to
  25. fetch the
  26. contents of the correct file and send it to the server along with data
  27. on which
  28. activity is being completed.
  29.  
  30. Cgi scripts are programs on a server machine. They have no access to
  31. the files
  32. on a browser's machine, so cgi won't do.
  33.  
  34. The only two ways of extending the capability of the browser appear to
  35. be helper
  36. apps and plugins. I don't think helper apps can transmit data back to
  37. a browser
  38. so that it can be forwarded to the server. Plugins seem to be the only
  39. alternative,
  40. but they are only activated when the browser comes across an unknown
  41. mime type.
  42.  
  43. My idea was to have a page of hypertext links that point to
  44. non-existant mime
  45. files so that the plugin would be called. The plugin would show a
  46. simple file
  47. browser so the user could find the correct file. The plugin passes the
  48. file back to
  49. the browser which forwards it to the server along with info on which
  50. link was chosen.
  51.  
  52. Another alternative would be to use a standalone ftp program to send
  53. the file
  54. to the server's machine and then have the user use a browser to tell
  55. the server
  56. where the file is. The problem with that is that the two activities
  57. are so loosely
  58. coupled that there are lots of chances for something to go awry
  59. (nerver trust a
  60. user :-)). The wrong file could be crosslinked to an activity, files
  61. could be sent
  62. to the server and never linked etc.
  63.  
  64. Plugins appear to be the cleaner solution, but there's no adequate
  65. documentation
  66. on how to write them! How can a plugin know which link was pressed?
  67. Should the
  68. file browser be an external program or does Visual C++ have a class I
  69. can use?
  70. How can I read the contents of a file and pass it back to the browser?
  71. How does
  72. the browser forward the data to the server?
  73.  
  74. Maybe I should go with an ftp program, but that is so inelegant! Any
  75. advice or
  76. documentation on plugins would be most appreciated.
  77.  
  78. Larry
  79.  
  80.